<!DOCTYPE html>
<html>

<head>
    <title>船舶档案信息</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=8">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <link rel="stylesheet" href="../library/bootstrap/css/bootstrap.min.css">
    <script type="text/javascript" src="../library/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="../project/project.config.js"></script>
    <style type="text/css" media="screen">
    html,
    body {
        font-family: 'Microsoft YaHei';
    }
    
    .container {
        margin-top: 20px;
        margin-bottom: 60px;
    }
    
    .row {
        margin-bottom: 60px;
    }
    
    table {
        table-layout: fixed;
        width: 100%;
        border-collapse: collapse;
    }
    
    table td:not(.space) {
        border: solid 1px silver;
        padding-left: 6px;
        overflow-wrap: break-word;
    }
    
    table td.key {
        line-height: 38px;
        font-weight: bold;
    }
    
    table td.space {
        width: 20px;
        border: none;
    }
    </style>
</head>

<body>
    <div class="container">
    </div>
    <script type="text/javascript">
    function parseQueryString(url) {
        var obj = {};
        var keyvalue = [];
        var key = "",
            value = "";
        var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
        for (var i in paraString) {
            if (paraString.hasOwnProperty(i)) {
                keyvalue = paraString[i].split("=");
                key = keyvalue[0];
                value = keyvalue[1];
                obj[key] = value;
            }
        }
        return obj;
    }

    function getTableHtml(obj) {
        var html = [];
        html.push('<div class="row">');
        html.push('<table>');
        html.push('<tr>');
        html.push('<td class="key">地区代码</td>');
        html.push('<td>' + obj.areacode + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">省级</td>');
        html.push('<td>' + obj.province + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">地市级</td>');
        html.push('<td>' + obj.city + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">区县级</td>');
        html.push('<td>' + obj.country + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">船舶类型</td>');
        html.push('<td>' + obj.ship_type + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">初始注册号</td>');
        html.push('<td>' + obj.initregister + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">呼号</td>');
        html.push('<td>' + obj.callsign + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">MMSI号</td>');
        html.push('<td>' + obj.mmsi + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">IMO号</td>');
        html.push('<td>' + obj.imo + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">通用分类</td>');
        html.push('<td>' + obj.classification + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">北斗ID</td>');
        html.push('<td>' + obj.beidouID + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">船旗国</td>');
        html.push('<td>' + obj.flag + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">原船名</td>');
        html.push('<td>' + obj.old_name + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">原船籍国</td>');
        html.push('<td>' + obj.old_flag + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">归属</td>');
        html.push('<td>' + obj.ascription + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">卫星通讯SN</td>');
        html.push('<td>' + obj.satellite_communication + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">传真</td>');
        html.push('<td>' + obj.fax + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">所有者电话（夜间）</td>');
        html.push('<td>' + obj.contacttelenight + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">审计时间</td>');
        html.push('<td>' + obj.audit_time + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">邮编</td>');
        html.push('<td>' + obj.post + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">注销时间</td>');
        html.push('<td>' + obj.logouttime + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">设备SN</td>');
        html.push('<td>' + obj.device_sn + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">代管</td>');
        html.push('<td>' + obj.isagent + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">AIS号</td>');
        html.push('<td>' + obj.aissn + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">备注</td>');
        html.push('<td>' + obj.remark + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">状态</td>');
        html.push('<td>' + obj.state + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">船名</td>');
        html.push('<td>' + obj.ship_name + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">船名英文</td>');
        html.push('<td>' + obj.ship_english_name + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">渔船编码</td>');
        html.push('<td>' + obj.fishing_boats_coding + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">渔船所属地</td>');
        html.push('<td>' + obj.fishing_boat_belongs + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">船籍港</td>');
        html.push('<td>' + obj.registry + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">船籍港英文</td>');
        html.push('<td>' + obj.registryE + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">造船厂名称</td>');
        html.push('<td>' + obj.shipyardn + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">造船厂名称英文</td>');
        html.push('<td>' + obj.shipyardnE + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">造船厂地址</td>');
        html.push('<td>' + obj.shipyard_address + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">造船厂地址英文</td>');
        html.push('<td>' + obj.shipyard_address_english + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">船长</td>');
        html.push('<td>' + obj.ship_length + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">型宽</td>');
        html.push('<td>' + obj.ship_width + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">型深</td>');
        html.push('<td>' + obj.moulded_depth + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">总吨位</td>');
        html.push('<td>' + obj.total_tonnage + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">净吨位</td>');
        html.push('<td>' + obj.net_tonnage + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">主机总功率</td>');
        html.push('<td>' + obj.host_total_power + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">主机型号1</td>');
        html.push('<td>' + obj.host_type1 + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">主机型号2</td>');
        html.push('<td>' + obj.host_type2 + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">主机型号3</td>');
        html.push('<td>' + obj.host_type3 + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">主机功率1</td>');
        html.push('<td>' + obj.host_power1 + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">主机功率2</td>');
        html.push('<td>' + obj.host_power2 + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">主机功率3</td>');
        html.push('<td>' + obj.host_power3 + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">船体材质</td>');
        html.push('<td>' + obj.hull_material + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">建造完工日期</td>');
        html.push('<td>' + obj.completion_time + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">子船主机数量</td>');
        html.push('<td>' + obj.number_of_ship_host + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">子船主机型号</td>');
        html.push('<td>' + obj.model_of_ship_host + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">子船船名</td>');
        html.push('<td>' + obj.name_of_sub_vessel + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">子船数量</td>');
        html.push('<td>' + obj.number_of_ship + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">子船总功率</td>');
        html.push('<td>' + obj.total_power_of_sub_ship + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">作业类型</td>');
        html.push('<td>' + obj.job_type + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">作业方式</td>');
        html.push('<td>' + obj.operation_mode + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">作业类型2</td>');
        html.push('<td>' + obj.job_type_two + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">作业方式2</td>');
        html.push('<td>' + obj.operation_mode_two + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">辅助作业方式</td>');
        html.push('<td>' + obj.auxiliary_operation_mode + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">具体辅助场所</td>');
        html.push('<td>' + obj.workplace + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">渔具名称</td>');
        html.push('<td>' + obj.fishing_name + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">渔具规格</td>');
        html.push('<td>' + obj.specifications + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">渔具数量</td>');
        html.push('<td>' + obj.quantity + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">捕捞品种</td>');
        html.push('<td>' + obj.fishing_species + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">捕捞限额</td>');
        html.push('<td>' + obj.fishing_quota + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">主作业开始时间</td>');
        html.push('<td>' + obj.start_time + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">主作业结束时间</td>');
        html.push('<td>' + obj.end_time + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">生产类型</td>');
        html.push('<td>' + obj.production_type + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">作业场所</td>');
        html.push('<td>' + obj.specific_workplace + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">身份证或企业编号</td>');
        html.push('<td>' + obj.icoe_number + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">持证人</td>');
        html.push('<td>' + obj.holder + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">持证人居民身份证号或企业注册号</td>');
        html.push('<td>' + obj.holder_card + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">持证人地址</td>');
        html.push('<td>' + obj.address + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">持证人电话</td>');
        html.push('<td>' + obj.witness_call + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">持证人邮政编码</td>');
        html.push('<td>' + obj.postal_code + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">所有者名称</td>');
        html.push('<td>' + obj.owner_name + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">所有者名称英文</td>');
        html.push('<td>' + obj.owner_ename + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">所有者地址</td>');
        html.push('<td>' + obj.owner_address + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">所有者地址英文</td>');
        html.push('<td>' + obj.owner_addresse + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">所有者电话</td>');
        html.push('<td>' + obj.owner_phone + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">签发人</td>');
        html.push('<td>' + obj.lssuer + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">签发日期</td>');
        html.push('<td>' + obj.date_of_issue + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">捕捞证件过期时间</td>');
        html.push('<td>' + obj.expired_time + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">船东</td>');
        html.push('<td>' + obj.shipowner + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">船东国籍</td>');
        html.push('<td>' + obj.nationality + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">登记船东</td>');
        html.push('<td>' + obj.registered_owner + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">用户</td>');
        html.push('<td>' + obj.users + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">用户国籍</td>');
        html.push('<td>' + obj.user_nationality + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">承运人</td>');
        html.push('<td>' + obj.carrier + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">承运人国籍</td>');
        html.push('<td>' + obj.carrier_nationality + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">资料更新日期</td>');
        html.push('<td>' + obj.update_time + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">中文船东</td>');
        html.push('<td>' + obj.shipowner_cn + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">通信地址</td>');
        html.push('<td>' + obj.mailing_address + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">邮编</td>');
        html.push('<td>' + obj.postcode + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">联系方式</td>');
        html.push('<td>' + obj.information + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">通用分类</td>');
        html.push('<td>' + obj.classification + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">入汇港</td>');
        html.push('<td>' + obj.port_entry + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">归属港澳</td>');
        html.push('<td>' + obj.hongKMacao + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">邮政编码</td>');
        html.push('<td>' + obj.postcode + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">捕捞许可证编号</td>');
        html.push('<td>' + obj.fishing_number + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">捕捞许可有效期</td>');
        html.push('<td>' + obj.fishing_lvp + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">渔船检验证书号</td>');
        html.push('<td>' + obj.fishing_inspection + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">渔船国籍登记号</td>');
        html.push('<td>' + obj.nationality_registration + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">渔船建造完工日期</td>');
        html.push('<td>' + obj.completion_date + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">船舶检验证书编号</td>');
        html.push('<td>' + obj.ship_icn + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">船检证书有效期</td>');
        html.push('<td>' + obj.validity_ovic + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">所有权证书编号</td>');
        html.push('<td>' + obj.title_cn + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">所有权取得日期</td>');
        html.push('<td>' + obj.date_oaoo + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">登记证书编号</td>');
        html.push('<td>' + obj.registration_cn + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">登记证书有效期</td>');
        html.push('<td>' + obj.validity_orc + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">注销或中止登记证明书编号</td>');
        html.push('<td>' + obj.cancellation_number + '</td>');
        html.push('</tr>');
        html.push('<tr>');
        html.push('<td class="key">船网指标批准书</td>');
        html.push('<td>' + obj.vessel_nia + '</td>');
        html.push('<td class="space"></td>');
        html.push('<td class="key">船网指标批准书有效期</td>');
        html.push('<td>' + obj.approval_povni + '</td>');
        html.push('</tr>');
        html.push('</table>');
        html.push('</div>');
        return html.join('');
    }

    var data = parseQueryString(window.location.href);
    var url = Project_ParamConfig.RealTargetConfig.shipRecordUrl;
    $.ajax({
        url: url,
        data: data,
        type: 'POST',
        dataType: 'json',
        context: this,
        success: function(res) {
            if (res.state !== 1 || !res.msg.list.length) {
                $(".container").html('<h1>未找到该船舶的档案资料！</h1>');
                return;
            }
            var list = res.msg.list;
            for (var i = 0, len = list.length; i < len; i++) {
                var obj = list[i] || {};
                if ($.isEmptyObject(obj)) {
                    continue;
                }
                var html = getTableHtml(obj);
                $(".container").append($(html));
            }
        },
        error: function() {
            $(".container").html('<h1>未找到该船舶的档案资料！</h1>');
        }
    });
    </script>
</body>

</html>
